<?php

namespace common\models\dynamic;

use Yii;

/**
 * This is the model class for table "{{%dynamic_topic}}".
 *
 * @property int $id
 * @property string $topic_content 话题内容
 * @property int $topic_id 话题id
 * @property int $dynamic_id 动态id
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class DynamicTopic extends \yii\db\ActiveRecord {

    use \common\traits\TimestampBehavior;
    use \common\traits\QueryInstanceActiveRecord;

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%dynamic_topic}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['topic_id', 'dynamic_id', 'created_at', 'updated_at'], 'integer'],
            [['topic_content'], 'string', 'max' => 120],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'topic_content' => 'Topic Content',
            'topic_id' => 'Topic ID',
            'dynamic_id' => 'Dynamic ID',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }

}
